import socket,json
a  = socket.socket(type=socket.SOCK_DGRAM)
add = ('0.0.0.0',54321)
a.bind(add)
while True:
    d,add = a.recvfrom(1000)
    print(d,add)
    a.sendto(json.dumps(add).encode(),add)